﻿using CPPEI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SLG.Domain
{
    static class Library
    {
        public static class ErrorCodes
        {
            public const int Com_UnknownError = 0x0001;
            public const int Com_InvalidParams = 0x0002;
            public const int Com_ObjectNotExist = 0x0003;
            public const int Com_ObjectExist = 0x0004;
            public const int Com_DbError = 0x0005;
            public const int User_NotExist = 0x0011;

            public static void Init()
            {
                CPPEI.ErrorCodes.Register(Library.ErrorCodes.Com_UnknownError, "未知错误");
                CPPEI.ErrorCodes.Register(Library.ErrorCodes.Com_InvalidParams, "错误的参数");
                CPPEI.ErrorCodes.Register(Library.ErrorCodes.Com_ObjectNotExist, "对象不存在");
                CPPEI.ErrorCodes.Register(Library.ErrorCodes.Com_ObjectExist, "对象已存在");
                CPPEI.ErrorCodes.Register(Library.ErrorCodes.Com_DbError, "对象已存在");
                CPPEI.ErrorCodes.Register(Library.ErrorCodes.User_NotExist, "用户不存在");
            }
        }
    }
}
